#ifndef __MID_FLASH_DRIVER_H
#define __MID_FLASH_DRIVER_H



typedef void (* flash_callback_t)(void);

#define NULL_CALLBACK      ((flash_callback_t)0xFFFFFFFFU)
typedef struct
{
	uint32_t PFlashBase;		  /*!< The base address of P-Flash memory */
	uint32_t PFlashSize;		  /*!< The size in byte of P-Flash memory */
	uint32_t DFlashBase;		  /*!< For FlexNVM device, this is the base address of D-Flash memory (FlexNVM memory);
								   *	For non-FlexNVM device, this field is unused */
	uint32_t DFlashSize;		  /*!< For FlexNVM device, this is the size in byte of area
								   *	which is used as D-Flash from FlexNVM memory;
								   *	For non-FlexNVM device, this field is unused */
	uint32_t EERAMBase; 		  /*!< The base address of FlexRAM (for FlexNVM device)
								   *	or acceleration RAM memory (for non-FlexNVM device) */
	uint32_t EEESize;			  /*!< For FlexNVM device, this is the size in byte of EEPROM area which was partitioned
								   *	from FlexRAM; For non-FlexNVM device, this field is unused */
	flash_callback_t CallBack;	  /*!< Call back function to service the time critical events. Any code reachable from this function
								   *   must not be placed in a Flash block targeted for a program/erase operation */
} flash_ssd_config_t;

/*******************************************************************************
* Flash SSD Configuration Structure
*******************************************************************************/
/*!
 * @brief Flash User Configuration Structure
 *
 * Implements : flash_user_config_t_Class
 */
typedef struct
{
	uint32_t PFlashBase;			/*!< The base address of P-Flash memory */
	uint32_t PFlashSize;			/*!< The size in byte of P-Flash memory */
	uint32_t DFlashBase;			/*!< For FlexNVM device, this is the base address of D-Flash memory
									 *	  (FlexNVM memory); For non-FlexNVM device, this field is unused */
	uint32_t EERAMBase; 			/*!< The base address of FlexRAM (for FlexNVM device)
									 *	  or acceleration RAM memory (for non-FlexNVM device) */
	flash_callback_t CallBack;		/*!< Call back function to service the time critical events. Any code reachable from this function
									 *	 must not be placed in a Flash block targeted for a program/erase operation */
} flash_user_config_t;

#endif